<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			.fr{
				float: right;
			}
			.fl{
				float: left;
			}
			.clear{
				clear: both;
			}
			
			.box{
				border: 2px solid red;
			}
			/* 并集选择器,把他们都选中 */
			.box1,.box2,.box3{
				width: 200px;
				height: 200px;
				margin: 2px;
			}
			.box1{
				background-color: red;
			}
			.box2{
				background-color: green;
			}
			.box3{
				background-color: yellowgreen;
			}
		</style>
	</head>
	<body>
		<fieldset id="">
			<legend>右浮动</legend>
			
			<div class="box">
				<div class="box1 fr"></div>
				<div class="box2 fr"></div>
				<div class="box3 fr"></div>
				<!-- 清楚浮动对其他元素的影响 -->
				<div class="clear"></div>
			</div>
			
		</fieldset>
		
		
		<fieldset id="">
			<legend>左浮动</legend>
			
			<div class="box">
				<div class="box1 fl"></div>
				<div class="box2 fl"></div>
				<div class="box3 fl"></div>
				<!-- 清楚浮动对其他元素的影响 -->
				<div class="clear"></div>
			</div>
			
		</fieldset>
	</body>
</html>
